package top.infopub.mgr.mgc.service.impl;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import top.infopub.generic.GenericDao;
import top.infopub.generic.GenericServiceImpl;
import top.infopub.mgr.mgc.dao.MsgTaskDao;
import top.infopub.mgr.mgc.domain.MsgTaskDomain;
import top.infopub.mgr.mgc.service.MsgTaskService;
import top.infopub.mgr.mgc.vo.MsgTaskVo;
import top.infopub.model.mgc.MsgTask;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;


@Service
public class MsgTaskServiceImpl extends GenericServiceImpl<MsgTask, String> implements MsgTaskService {

    @Autowired
    private MsgTaskDao msgTaskDao;

    @Override
    public GenericDao<MsgTask, String> getDao() {
        return msgTaskDao;
    }

    @Override
    public List<MsgTaskDomain> selectByDomainWhere(MsgTaskVo msgTaskVo) {
        return msgTaskDao.selectByDomainWhere(msgTaskVo);
    }

    @Override
    public Page<MsgTaskDomain> selectPageByVo(Page<MsgTaskDomain> page, MsgTaskVo msgTaskVo) {
        PageHelper.startPage(page.getPageNum(), page.getPageSize());
        return (Page<MsgTaskDomain>)msgTaskDao.selectByDomainWhere(msgTaskVo);
    }

}